package com.mtsmda.web.managedBeans;

import java.util.ArrayList;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

import com.mtsmda.daoI.CustomerDAOI;
import com.mtsmda.daoImpl.WrapperCustomer;
import com.mtsmda.is.admin.domain.Customer;
import com.mtsmda.web.WSProvider;

@RequestScoped
@ManagedBean(name = "Customer")
public class CustomerManagedBean {

	private ArrayList<Customer> customers;

	public void getCustomersWS() {
		CustomerDAOI customerWS = WSProvider.customerWS();
		WrapperCustomer allCustomers = customerWS.getAllCustomers();
		setCustomers(allCustomers.getCustomers());
	}

	public ArrayList<Customer> getCustomers() {
		return customers;
	}

	public void setCustomers(ArrayList<Customer> customers) {
		this.customers = customers;
	}

}